<ol class="breadcrumb">
  <li class="breadcrumb-item">{{t "interfaces" }}</li>
  <li class="breadcrumb-item"
    {{#if interface.deprecated}}
        class="breadcrumb-item deprecated-name"
    {{/if}}
  >
  {{interface.name}}</li>
</ol>

<ul class="nav nav-tabs" role="tablist">
    {{#each navTabs}}
        <li class="nav-item">
            <a href="{{this.href}}" 
                class="nav-link"
                {{#compare @index "===" 0}}class="nav-link active"{{/compare}}
                role="tab" id="{{this.id}}-tab" data-bs-toggle="tab" data-link="{{this.data-link}}">{{t this.label}}</a>
        </li>
    {{/each}}
</ul>

<div class="tab-content">
    {{#isTabEnabled navTabs "info"}}
    <div class="tab-pane fade {{#isInitialTab navTabs "info"}}active in{{/isInitialTab}}" id="info">
        {{#unless disableFilePath}}
        <p class="comment">
            <h3>{{t "file" }}</h3>
        </p>
        <p class="comment">
            <code>{{interface.file}}</code>
        </p>
        {{/unless}}

        {{#if interface.deprecated}}
            <p class="comment">
                <h3 class="deprecated">{{t "deprecated" }}</h3>
            </p>
            <p class="comment">
                {{{ interface.deprecationMessage }}}
            </p>
        {{/if}}

        {{#if interface.description}}
            <p class="comment">
                <h3>{{t "description" }}</h3>
            </p>
            <p class="comment">
                {{{parseDescription interface.description depth}}}
            </p>
        {{/if}}

        {{#if interface.extends}}
            <p class="comment">
                <h3>{{t "extends" }}</h3>
            </p>
            <p class="comment">
                {{#each interface.extends}}
                    {{> link-type type=this }}
                {{/each}}
            </p>
        {{/if}}

        {{#orLength interface.properties interface.methods}}
        <section data-compodoc="block-index">
            <h3 id="index">{{t "index" }}</h3>
            <table class="table table-sm table-bordered index-table">
                <tbody>
                    {{#compare interface.properties.length ">" 0}}
                    <tr>
                        <td class="col-md-4">
                            <h6><b>{{t "properties" }}</b></h6>
                        </td>
                    </tr>
                    <tr>
                        <td class="col-md-4">
                            <ul class="index-list">
                            {{#each interface.properties}}
                                <li>
                                    {{#if name}}
                                        {{#if optional}}
                                            <span class="modifier">{{t "optional" }}</span>
                                        {{/if}}
                                        <a href="#{{name}}" 
                                            {{#if deprecated}}
                                                class="deprecated-name"
                                            {{/if}}>
                                            {{name}}
                                        </a>
                                    {{else}}
                                        {{#if id}}
                                            <a href="#{{id}}">{{t "unamed-property" }}</a>
                                        {{/if}}
                                    {{/if}}
                                </li>
                            {{/each}}
                            </ul>
                        </td>
                    </tr>
                    {{/compare}}
                    {{#compare interface.methods.length ">" 0}}
                    <tr>
                        <td class="col-md-4">
                            <h6><b>{{t "methods" }}</b></h6>
                        </td>
                    </tr>
                    <tr>
                        <td class="col-md-4">
                            <ul class="index-list">
                            {{#each interface.methods}}
                                <li>
                                    {{#each modifierKind}}
                                        <span class="modifier">{{modifKind this}}</span>
                                    {{/each}}
                                    {{#if optional}}
                                        <span class="modifier">{{t "optional" }}</span>
                                    {{/if}}
                                    <a href="#{{name}}" 
                                        {{#if deprecated}}
                                            class="deprecated-name"
                                        {{/if}}>
                                        {{name}}
                                    </a>
                                </li>
                            {{/each}}
                            </ul>
                        </td>
                    </tr>
                    {{/compare}}
                </tbody>
            </table>
        </section>
        {{/orLength}}

        {{#if interface.methods}}
            {{> block-method methods=interface.methods file=interface.file }}
        {{/if}}

        {{#if interface.indexSignatures}}
            {{> block-index indexables=interface.indexSignatures file=interface.file }}
        {{/if}}

        {{#if interface.properties}}
            <section data-compodoc="block-properties">
                <h3 id="inputs">{{t "properties" }}</h3>
                {{#each interface.properties}}
                    <table class="table table-sm table-bordered">
                        <tbody>
                            {{#if name}}
                                <tr>
                                    <td class="col-md-4">
                                        <a name="{{name}}"></a>
                                        <span class="name {{#if deprecated}}deprecated-name{{/if}}"><b>{{name}}</b>
                                            <a href="#{{name}}">
                                                <span class="icon ion-ios-link"></span>
                                            </a>
                                        </span>
                                    </td>
                                </tr>
                                {{#if deprecated}}
                                <tr>
                                    <td class="col-md-4 deprecated">
                                        {{{ deprecationMessage }}}
                                    </td>
                                </tr>
                                {{/if}}
                                <tr>
                                    <td class="col-md-4">
                                        <code>{{name}}: {{> link-type type=type }}</code>
                                    </td>
                                </tr>

                                {{#jsdoc-default jsdoctags}}
                                <tr>
                                    <td class="col-md-4">
                                        <i>{{t "default-value" }} : </i><code>{{{clean-paragraph tag.comment}}}</code>
                                    </td>
                                </tr>
                                {{/jsdoc-default}}

                                {{#if type}}
                                    <tr>
                                        <td class="col-md-4">
                                            <i>{{t "type" }} : </i>{{> link-type type=type }}
                                        </td>
                                    </tr>
                                {{/if}}

                                {{#if optional}}
                                    <tr>
                                        <td class="col-md-4">
                                            <i>{{t "optional" }}</i>
                                        </td>
                                    </tr>
                                {{/if}}

                                {{#if defaultValue}}
                                    <tr>
                                        <td class="col-md-4">
                                            <i>{{t "default-value" }}: </i><code>{{defaultValue}}</code>
                                        </td>
                                    </tr>
                                {{/if}}

                            {{else}}

                                {{#if args}}
                                    <tr>
                                        <td class="col-md-4">
                                            <i>{{t "signature" }} :</i>
                                            <a name="{{id}}"></a>
                                            <code>
                                                <!--ts.SyntaxKind.CallSignature-->
                                                {{#compare ../interface.kind "===" 151 }}
                                                    {{{functionSignature this}}}
                                                {{else}}
                                                    {{indexableSignature this}}
                                                {{/compare}}
                                            </code>
                                        </td>
                                    </tr>
                                {{/if}}


                                {{#if returnType}}
                                    <tr>
                                        <td class="col-md-4">
                                            <i>{{t "returns" }} : </i>{{> link-type type=returnType }}
                                        </td>
                                    </tr>
                                {{/if}}

                                {{#if jsdoctags}}
                                    {{#jsdoc-params-valid jsdoctags}}
                                    <tr>
                                        <td class="col-md-4">
                                            <div class="io-description">
                                                {{#jsdoc-params jsdoctags}}
                                                    <b>{{t "parameters" }} :</b>
                                                    <table class="params">
                                                        <thead>
                                                                <tr>
                                                                    <td>{{t "name" }}</td>
                                                                    {{#one-parameter-has tags 'type'}}
                                                                        <td>{{t "type" }}</td>
                                                                    {{/one-parameter-has}}
                                                                    {{#one-parameter-has tags 'comment'}}
                                                                        <td>{{t "description" }}</td>
                                                                    {{/one-parameter-has}}
                                                                </tr>
                                                        </thead>
                                                        <tbody>
                                                            {{#each tags}}
                                                                <tr>
                                                                    {{#if name}}
                                                                        <td>{{name}}</td>
                                                                    {{/if}}
                                                                    {{#one-parameter-has ../tags 'type'}}
                                                                        <td>
                                                                            {{#if type}}
                                                                                {{> link-type type=type }}
                                                                            {{/if}}
                                                                        </td>
                                                                    {{/one-parameter-has}}
                                                                    {{#one-parameter-has ../tags 'comment'}}
                                                                        <td>
                                                                            {{#if comment}}
                                                                                <code>{{{comment}}}</code>
                                                                            {{/if}}
                                                                        </td>
                                                                    {{/one-parameter-has}}
                                                                </tr>
                                                            {{/each}}
                                                        </tbody>
                                                    </table>
                                                {{/jsdoc-params}}
                                                {{#jsdoc-example jsdoctags}}
                                                    <b>{{t "example" }} :</b>
                                                    {{#each tags}}
                                                        <div class="jsdoc-example-ul">
                                                            {{{comment}}}
                                                        </div>
                                                    {{/each}}
                                                {{/jsdoc-example}}
                                            </div>
                                        </td>
                                    </tr>
                                    {{/jsdoc-params-valid}}
                                {{/if}}

                            {{/if}}

                            {{#if line}}
                                {{#isTabEnabled navTabs "source"}}
                                    <tr>
                                        <td class="col-md-4">
                                            <div class="io-line">{{t "defined-in" }} <a href="" data-line="{{{line}}}" class="link-to-prism">{{../interface.file}}:{{{line}}}</a></div>
                                        </td>
                                    </tr>
                                {{/isTabEnabled}}
                            {{/if}}

                            {{#if description}}
                            <tr>
                                <td class="col-md-4">
                                    <div class="io-description">{{{parseDescription description ../depth}}}</div>
                                </td>
                            </tr>
                            {{/if}}
                        </tbody>
                    </table>
                {{/each}}
            </section>
        {{/if}}
    </div>
    {{/isTabEnabled}}

    {{#isTabEnabled navTabs "readme"}}
    <div class="tab-pane fade {{#isInitialTab navTabs "readme"}}active in{{/isInitialTab}}" id="readme">
        <p>{{{interface.readme}}}</p>
    </div>
    {{/isTabEnabled}}

    {{#isTabEnabled navTabs "source"}}
    <div class="tab-pane fade {{#isInitialTab navTabs "source"}}active in{{/isInitialTab}} tab-source-code" id="source">
        <pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">{{ interface.sourceCode}}</code></pre>
    </div>
    {{/isTabEnabled}}
</div>
